package com.syni.mdd.yhd.common.all.controller.api;

import com.syni.mdd.yhd.common.all.dto.requestDto.marketing.MarketActivityReDto;
import com.syni.mdd.yhd.common.all.service.BmsMarketActivityService;
import com.syni.mdd.yhd.common.all.service.MtHdAppLoginService;
import com.syni.mdd.yhd.common.all.validationGroup.GroupInsert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @className BmsMarketingController
 * @description 商户端营销工具跳转
 * @Author cfx
 * @DATE 2019/6/25 10:15
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/ApiMarketing")
public class ApiMarketingController {
    @Autowired
    MtHdAppLoginService mtHdAppLoginService;

    @Autowired
    BmsMarketActivityService bmsMarketActivityService;

    @PostMapping("/releaseActivity")
    public Map<String,Object> releaseActivity(@RequestBody @Validated(value = {GroupInsert.class}) MarketActivityReDto activityReDto){
        return bmsMarketActivityService.releaseActivity(activityReDto);
    }
}
